{extend name="public:layout" /}

{block name="title"}
    <title>{:site('siteName')}-邀请好友</title>
{/block}

{block name="css"}
	<link rel="stylesheet" href="__STATIC__/share/css/share.css" type="text/css" />
    <style>
		.layui-form-label{width:60px;    padding: 9px 6px;}
		.layui-input-block{margin-left:75px;margin-right:10px;}
		.layui-form-item { margin-bottom: 9px;}
		.layui-input::-webkit-input-placeholder{ color: #999;font-size:12px;}
		.layui-input::-moz-placeholder{  color: #999;font-size:12px; }
		.layui-input:-ms-input-placeholder{color: #999;font-size:12px;}
    </style>
{/block}

{block name="content"}
    <div class="head">邀请好友</div>
    <div class="invite_yaoqing">
		<p>我的邀请码：<span class="invite_yaoqing_span">{:session('user.user_id')}</span></p>
		<p>我的邀请收入：<span class="invite_yaoqing_span">¥{$U['invite_money']}</span></p>
	</div>
	<div class="layui-form-item" style="padding-top: 10px;">
    	<label class="layui-form-label">邀请链接</label>
    	<div class="layui-input-block">
     		<input type="text" name="url" value="{:request()->domain()}/register/{:session('user.user_id')}" readonly="true" class="layui-input">
    	</div>
  	</div>
  	<div id="share" style="margin-left: 5px;"></div>
  	<div class="layui-tab layui-tab-brief">
		<ul class="layui-tab-title">
			<li class="layui-this">我的邀请</li>
		</ul>
		<div class="layui-tab-content">
			<table class="layui-table">
			  	<thead>
					<tr>
					   <th>用户</th>
				       <th>QQ号</th>
				       <th>微信</th>
				       <th>时间</th>
					</tr> 
			  	</thead>
			  	<tbody>
					{volist name="invites" id="v"}
				        <tr>
				            <td>{$v.username}</td>
				            <td>{$v.qq}</th>
				            <td>{$v.wechat}</th>
				            <td>{:date('Y-m-d',$v['create_time'])}</td>
				        </tr>
			        {/volist}
			  	</tbody>
			</table>
		</div>
	</div>
{/block}

{block name="script"}
	<script src="__STATIC__/share/js/share.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(function() {
            $("#share").socialShare({
                content: '分享赚不停',
				url:'{:request()->domain()}/register/{:session('user.user_id')}',
				titile:'分享好友'
            });
            $(".msb_main").trigger('click');
        });
	</script>
{/block}
